create or replace trigger tri_in_rec_insert
  before insert ON in_rec
  for each row
declare
  nextid number;
begin
  select S_COUNTRY_ID.nextval into nextid from sys.dual;
  :new.rec_id:=nextid;
end tri_in_rec_insert;
/
